# Basic SSL Plugin

import { SourceCode } from 'rspress/theme';

<SourceCode href="https://github.com/web-infra-dev/rsbuild/tree/main/packages/plugin-basic-ssl" />

Generate an untrusted, self-signed certificate for the HTTPS server.

The Basic SSL plugin will automatically generate a self-signed certificate and set the [server.https](/config/server/https) option. When you visit the page, your browser will indicate that the certificate is not trusted. You can access the HTTPS page after manually confirming this.

## Quick Start

### Install Plugin

You can install the plugin using the following command:

import { PackageManagerTabs } from '@theme';

<PackageManagerTabs command="add @rsbuild/plugin-basic-ssl -D" />

### Register Plugin

You can register the plugin in the `rsbuild.config.ts` file:

```ts title="rsbuild.config.ts"
import { pluginBasicSsl } from '@rsbuild/plugin-basic-ssl';

export default {
  plugins: [pluginBasicSsl()],
};
```

Then visit the https URL of the page, and confirm in your browser.
